From: Florian Müllner Date: Thu, 13 Nov 2025 19:01:04 +0000 (+0100) Subject: status/powerProfiles: Indicate non-default power mode in top bar X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~44^2~43 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=449a4e354af82a2412cfb1ee2fe26451631aeae6;p=gnome-shell.git status/powerProfiles: Indicate non-default power mode in top bar It is quite easy to switch the power profile for some specific purpose, and then forgetting to change it back and experiencing unexpected performance behavior later. To help with that, indicate the active power profile in the top bar if it diverges from the default 'balanced' one. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7440 Part-of: --- diff --git a/js/ui/status/powerProfiles.js b/js/ui/status/powerProfiles.js index ebaf1f8ea..60ed2fd72 100644 --- a/js/ui/status/powerProfiles.js +++ b/js/ui/status/powerProfiles.js @@ -136,6 +136,17 @@ class Indicator extends SystemIndicator { _init() { super._init(); - this.quickSettingsItems.push(new PowerProfilesToggle()); + this._indicator = this._addIndicator(); + + this._powerProfilesToggle = new PowerProfilesToggle(); + + this._powerProfilesToggle.bind_property('icon-name', + this._indicator, 'icon-name', + GObject.BindingFlags.SYNC_CREATE); + this._powerProfilesToggle.bind_property('checked', + this._indicator, 'visible', + GObject.BindingFlags.SYNC_CREATE); + + this.quickSettingsItems.push(this._powerProfilesToggle); } });